package com.ruoyi.basedata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.common.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 小档案对象 t_terminals_xb
 *
 * @author ruoyi
 * @date 2023-09-07
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_terminals_xb")
public class TerminalsXbRGView implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @TableId
//    @JsonProperty("id")
    private Long id;

    /**
     * 设备归属水司
     */
    @TableField("tenant_id")
    @Excel(name = "所属水司")
    private String tenantId;

    @TableField(exist = false)
    @Excel(name = "用户名称", type = Excel.Type.EXPORT)
    private String userName;

    /**
     * 用户编号
     */
    @Excel(name = "用户编号")
//    @JsonProperty("UserId")
    @TableField("user_id")
    private String userId;

    /**
     * 门牌号
     */
    @Excel(name = "门牌号", type = Excel.Type.EXPORT)
//    @JsonProperty("InstallAddress")
    @TableField("install_address")
    private String installAddress;

    /**
     * 设备编号
     */
    @Excel(name = "设备编号")
//    @JsonProperty("TerminalId")
    @TableField("terminal_id")
    private String terminalId;

    @Excel(name = "IMEI")
//    @JsonProperty("IMEI")
    @TableField("imei")
    private String imei;

    /**
     * 区域编号
     */
    @Excel(name = "区域编号", type = Excel.Type.IMPORT)
    @TableField("sheets_code")
    private String sheetsCode;

    /**
     * 厂家编号
     */
    @Excel(name = "厂家编号", dictType = "terminal_supplier")
//    @JsonProperty("SupplierId")
    @TableField("supplier_id")
    private String supplierId;

    /**
     * 表型号ID
     */
    @Excel(name = "表型号ID")
//    @JsonProperty("TypeID")
    @TableField("type_id")
    private String typeId;

    /**
     * 表底数
     */
    @Excel(name = "表底数", type = Excel.Type.EXPORT)
//    @JsonProperty("BaseReading")
    @TableField("base_reading")
    private BigDecimal baseReading;

    /**
     * 是否带阀控(0：否，1：是)
     */
    @Excel(name = "是否带阀控(0：否，1：是)")
//    @JsonProperty("ValveControl")
    @TableField("valve_control")
    private Long valveControl;

    /**
     * 阀门地址
     */
    @Excel(name = "阀门地址", type = Excel.Type.EXPORT)
//    @JsonProperty("ValveAddress")
    @TableField("valve_address")
    private String valveAddress;

    /**
     * 安装日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "安装日期", width = 30, dateFormat = "yyyy-MM-dd", type = Excel.Type.EXPORT)
//    @JsonProperty("InstallDate")
    @TableField("install_date")
    private Date installDate;

    /**
     * 抄表周期
     */
    @Excel(name = "抄表周期")
//    @JsonProperty("MeterReaderCycle")
    @TableField("meter_reader_cycle")
    private Long meterReaderCycle;


    //    @Excel(name = "集中器名称")
    @TableField(exist = false)
//    @JsonProperty("ConcentratorName")
    private String concentratorName;

    /**
     * 采集器ID
     */
//    @Excel(name = "采集器Id")
//    @JsonProperty("CollectorId")
    @TableField("collector_id")
    private Long collectorId;

    /**
     * 采集器地址
     */
    @TableField(exist = false)
    private String collectorAddress;

    @Excel(name = "表状态", readConverterExp = "0=停用,1=使用", type = Excel.Type.EXPORT)
    //    @JsonProperty("TerminalMark")
    @TableField("terminal_mark")
    private Integer terminalMark;

    /**
     * 协议id
     */
//    @TableField("protocol_id")
    @Excel(name = "协议ID")
    @TableField("protocol_id")
    private String protocolId;

    @Excel(name = "表解析地址")
    @TableField("communicate_address")
    private String communicateAddress;

    /**
     * 集中器ID
     */
    @Excel(name = "集中器ID")
//    @JsonProperty("ConcentratorId")
    @TableField("concentrator_id")
    private Long concentratorId;

    /**
     * 集中器地址
     */
    @Excel(name = "集中器地址")
    @TableField(exist = false)
    private String concentratorAddress;
    /**
     * 换表标志(0：否，1：是)
     */
//    @Excel(name = "换表标志(0：否，1：是)", type = Excel.Type.EXPORT)
//    @JsonProperty("ChangeMark")
    @TableField("change_mark")
    private Integer changeMark;

    /**
     * 新表地址
     */
//    @Excel(name = "新表地址", type = Excel.Type.EXPORT)
//    @TableField("Terminal_new")
    @TableField("terminal_new")
    private String terminalNew;

    //    @Excel(name = "计量版电压类型", type = Excel.Type.EXPORT)
    @TableField("voltage_type")
    private String voltageType;

    //    @Excel(name = "计量版电压", type = Excel.Type.EXPORT)
    @TableField("metered_voltage")
    private BigDecimal meteredVoltage;

    //    @Excel(name = "瞬时流量计算方式", type = Excel.Type.EXPORT)
    @TableField("instantaneous_js_fs")
    private String instantaneousJsFs;

    //    @Excel(name = "AEP平台的唯一码", type = Excel.Type.EXPORT)
    @TableField("device_id")
    private String deviceId;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableField("del_flag")
    private Integer delFlag;

    /**
     * 备注
     */
    @TableField("remark")
//    @Excel(name = "备注", type = Excel.Type.EXPORT)
    private String remark;

    @TableField("create_by")
    private String createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;

    @TableField("update_by")
    private String updateBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    private Date updateTime;

    @TableField(exist = false)
    private String treeAreaCode;

    @TableField(exist = false)
    private String treeLdId;

    @TableField(exist = false)
    private String belongDepartment;

    @TableField(exist = false)
    private Boolean isBound;     //查询条件是否绑定


    @TableField(exist = false)
//    @Excel(name = "门牌号", type = Excel.Type.EXPORT)
    private String roomName;

    @TableField(exist = false)
//    @Excel(name = "协议名称", type = Excel.Type.EXPORT)
    private String protocolName;

    //    @Excel(name = "表类型", type = Excel.Type.EXPORT)
    @TableField(exist = false)
    private String moduleType;

    //    @Excel(name = "楼栋名称", type = Excel.Type.EXPORT)
    @TableField(exist = false)
    private String ldName;

    @TableField(exist = false)
    private String sortBy;

    @TableField(exist = false)
    private Integer areaid;

    @TableField(exist = false)
//    @JsonProperty("AreaName")
    private String AreaName;

    @TableField(exist = false)
    private String searchValue;

    /**
     * 阀门状态
     */
    @Excel(name = "阀门状态", readConverterExp = "0.00=关,1.00=开")
    @TableField(exist = false)
    private BigDecimal valveState;

    /**
     * 抄表时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "抄表时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date readDate;

    /**
     * 水表读数
     */
    @Excel(name = "水表读数")
    @TableField(exist = false)
    private BigDecimal totalFlow;

    /**
     * 管径大小
     */
    @TableField(exist = false)
    @JsonProperty("calibreValue")
    private String calibreValue;
    /**
     * 信号
     */
    @TableField(exist = false)
    @JsonProperty("terminalCsq")
    private BigDecimal terminalCsq;
    /**
     * 电池电压
     */
    @TableField(exist = false)
    @JsonProperty("terminalVol")
    private BigDecimal terminalVol;
}
